<template>
	<view>
		<view style="height: 10rpx;background-color: #cccccc;"></view>
		<view>
			<view class="goods-info">
		       <image :src="swichImg()" style="height: 130rpx;width: 130rpx;" />
		       <view style="margin-left: 10px;">
		           <view class="gname">{{gname}}</view>
		           <view class="jianjie">{{jianjie}}</view>
		       </view>
			</view>
		    <view class="guize" id="guize" @click="showYunfeiRule()">退货运费规格
				<image src="../../../static/center/gd.png" style="width: 30rpx;height: 30rpx;"></image>
			</view>
		    <view class="tuihuohekuan" @click="tuihuo()">
		        <view><image src="../../../static/center/tuihuo.png" class="icon" /></view>
		        <view class="tuiitem">
		            <view class="lalala">我要退货退款</view>
		            <view class="tips">已收到货，需要退还已收到的货物</view>
		        </view>
		        <view class="jt"><image src="../../../static/center/gd.png" style="width: 30rpx;height: 30rpx;" /></view>
		    </view>
		    <view class="tuikuan" @click="tuikuan()">
		        <view><image src="../../../static/center/tuikuan.png" class="icon" /></view>
		        <view class="tuiitem">
		            <view class="lalala">我要退款(无需退货)</view>
		            <view class="tips">未收到货，或与商家协商之后申请</view>
		        </view>
		        <view class="jt"><image src="../../../static/center/gd.png" style="width: 30rpx;height: 30rpx;" /></view>
		    </view>
		    <view class="huanbuxiu" @click="huanhuo()">
		        <view><image src="../../../static/center/huanhuo.png" class="icon" /></view>
		        <view class="tuiitem">
		            <view class="lalala">只换不修</view>
		            <view class="tips">对收到的商品不满意，可与商家协商换货</view>
		        </view>
		        <!-- <view class="jt"><img src="image/center/gd.png" /></view> -->
				<view class="jt"><image src="../../../static/center/gd.png" style="width: 30rpx;height: 30rpx;" /></view>
		    </view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				orId:'',			//订单ID
				odId:'',			//订单详情ID
				tel:'',				//用户联系电话
				gid:'',				//商品ID
				gzhId:'',			//联盟商家ID
				gname:'',			//商品名称
				gimages:'',			//商品图片
				jianjie:'',			//商品简介
			}
		},
		onLoad(opt) {
			this.orId = opt.orId;
			this.odId = opt.odId;
			this.tel = opt.tel;
			this.gid = opt.gid;
			this.gzhId = opt.gzhId;
			this.gname = opt.gname;
			this.gimages = opt.gimages;
			this.jianjie = opt.jianjie;
		},
		methods: {
			swichImg(){
				return this.host+this.gimages
			},
			//跳转退换货运费承担规则
			showYunfeiRule(){
				uni.navigateTo({
					url:'showYunfeiRule'
				})
			},
			//退货
			tuihuo(){
				uni.navigateTo({
					url:'tuihuoShenQing?gid='+this.gid+'&orId='+this.orId+'&tel='+this.tel+'&gzhId='+this.gzhId+'&odId='+this.odId
				})
			},
			//退款不退货
			tuikuan(){
				uni.navigateTo({
					url:'tuikuanShenQing?gid='+this.gid+'&orId='+this.orId+'&tel='+this.tel+'&gzhId='+this.gzhId+'&odId='+this.odId
				})
			},
			//换货
			huanhuo(){
				uni.navigateTo({
					url:'huanhuoShenQing?gid='+this.gid+'&orId='+this.orId+'&tel='+this.tel+'&gzhId='+this.gzhId+'&odId='+this.odId
				})
			}
		}
	}
</script>

<style>
	.lalala{
		font-size: 17px;
	}
	.tuihuohekuan .icon,.tuikuan .icon,.huanbuxiu .icon{
		width: 20px;
		height: 20px;
	}
	.jt img{
		width: 14px;
		height: 14px;
	 }
	.tuihuohekuan,.tuikuan,.huanbuxiu,.guize{
		display: flex;
		justify-content: space-between;
		padding: 20px 10px;
		border-radius: 5px;
		margin: 10px;
		background-color: white;
		font-size: 17px;
	}
	.tips{
		margin-top: 10px;
		font-size: 14px;
		color: #cccccc;
	}
	.tuihuohekuan view,.tuikuan view,.huanbuxiu view{
		flex:1;
	}
	.tuihuohekuan .tuiitem,.tuikuan .tuiitem,.huanbuxiu .tuiitem{
		flex: 9;
	}
	#guize{
		padding: 5px;
	}
	.jt{
		display: flex;
	   flex-direction: column;
		justify-content: center;
	}
	.goods-info{
		padding: 10px;
		display: flex;
		background-color: white;
	}
	#gimage{
		width: 60px;
		height: 60px;
	}
	.jianjie{
		margin-top: 6px;
		font-size: 14px;
		color: #cccccc;
	}
</style>
